<template>
	<view class="">
		<view class="nav bgf">
			<u-tabs :list="tabs_list" @change="selectTabs" :current='current' lineWidth='64rpx' lineHeight='6rpx'
				lineColor='#2A71C0' :activeStyle="{
		    color: '#2A71C0',
		    fontWeight: 'bold',
			fontSize:'26rpx',
		    transform: 'scale(1.05)'
		}" :inactiveStyle="{
		    color: '#666666',
			fontSize:'26rpx',
		    transform: 'scale(1)'
		}" itemStyle="width:44%; height: 80rpx;"></u-tabs>
		</view>

		<view class="m2432">
			<view class="flex_x c6 fs26" v-if="current == 0">
				<view class="btn flex_c mr24" :class="{'btna':active==item.id}" v-for="(item,index) in menu_list"
					:key="item.id" @click="selectMenu(item,index)">{{item.name}}</view>
			</view>

			<view class="mt24 bgf p24 br16">
				<view class="" v-for="item in 10">
					<view class="flex_btw">
						<view class="flex1">
							<view class="c3 fw500 fs28">月度200单奖励</view>
							<view class="mt20 c9 fs24">2021-12-08 12:25:26</view>
						</view>
						<view class="c2a7 fw600 fs36 ml20">+500</view>
					</view>
					<view class="cut_line mtb24"></view>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	import {
		pageSize
	} from '@/components/minxins.js' //引入minxins
	export default {
		mixins: [pageSize],
		components: {},
		data() {
			return {
				tabs_list: [{
					name: '收入',
				}, {
					name: '支出',
				}],
				current: 0, //表示
				menu_list: [{
						id: '',
						name: '全部'
					},
					{
						id: 1,
						name: '佣金收入'
					},
					{
						id: 2,
						name: '奖励收入'
					}
				],
				active: '', //标识

			}
		},
		onLoad() {
			console.log(88);
			this.commission_income()
		},
		onShow() {

		},
		methods: {
			commission_income() { //余额明细
				console.log(88);
				this.method_name = 'commission_income'
				this.query = {
					type: this.current + 1,
					status: this.active,
				}
				this.getList()
			},
			selectTabs(e) { //切换标签
				this.current = e.index
				this.page = 1
				this.commission_income()
			},
			selectMenu(item, index) { //筛选按钮
				this.active = item.id
				this.page = 1
				this.commission_income()
			}
		},
		computed: {

		},
		watch: {

		}
	}
</script>

<style lang="scss" scoped>
	.btn {
		width: 122upx;
		height: 46upx;
		border-radius: 8upx;
		background: #E4E4E4;
		transition: 0.2s;
	}

	.btna {
		background-color: #2A71C0;
		color: #fff;
		transition: 0.2s;
	}
</style>
